package com.itliupeng.stock.service;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.itliupeng.stock.pojo.domain.children;
import com.itliupeng.stock.pojo.entity.SysUser;
import com.itliupeng.stock.vo.req.LoginReqVo;
import com.itliupeng.stock.pojo.domain.queryUser;
import com.itliupeng.stock.pojo.domain.UserInfoVo;
import com.itliupeng.stock.vo.resp.*;

import java.util.List;
import java.util.Map;

/**
 * Description:
 * Author:lp
 * Date:2025-04-07
 * Time:9:58
 */
public interface UserService {



    SysUser findByUserName(String userName);

    public R<LoginRespVo> login(LoginReqVo loginReqVo);

    R<Map> getCaptchaCode();

    R<PageResult<SysUser>> getUserPage(queryUser queryUs);

    R<ResponseCode> addUser(SysUser sysUser);

    R<Map<String, List>> getUserRole(String userId);

    R<ResponseCode> updateUserRoles(Map<String, Object> req);

    R<ResponseCode> deleteUser(List<Long> userList);

    R<SysUser> getUserInfo(String userId);

    R<ResponseCode> updateUserInfo(UserInfoVo userInfoVo);

    R<PageResult> getRolePages(Map<String, Integer> pageInfo);

    R<List<children>> getPermissionsTree();

    R<ResponseCode> addRoleAndPer(Map<String, Object> addRole) throws JsonProcessingException;

    R<List<String>> getRolePers(String roleId);

    R<ResponseCode> updateRoleAndPer(Map<String, Object> updateRole) throws JsonProcessingException;

    R<ResponseCode> deleteRoleAndPer(String roleId);

    R<ResponseCode> updateRoleStatus(Long roleId, Long status);
}
